<?php
echo "sssssss#########";
require_once('GoogleMapAPI.class.php');
$address='HMAS CRESWELL';
$text='abc';
$mapDetailsArray = array(0 => array('country' => 'AU','city' => 'HMAS CRESWELL'),1=>array('country' => 'AU','city' => 'HMAS CRESWELL'));
 //	$map = new GoogleMapAPI('map');
echo count($mapDetailsArray);
if(count($mapDetailsArray) > 0)
	{
	  $map = new GoogleMapAPI('map');
	 $map->setHeight('150px');
    $map->setWidth('350px');
	// sp
	$map->setAPIKey('ABQIAAAAwbwAonMdkRlo6b6J_KBi7RTlALOyp2CbwxfXPsAbt4GlSe0_kRSESRxmWAg19B-76Qt_lT2NvnxRww');	
	//Local Production server
	//$map->setAPIKey('ABQIAAAAb3qHeivjEz3tfmHaOy4Y-hRKvY8LkyxZcmdtcTpYRIPcb8-ebhSxCEHQqf8OjxK_c0qyGky90LhpuQ');
	//Jobjasoos.com
	//$map->setAPIKey('ABQIAAAAb3qHeivjEz3tfmHaOy4Y-hSZwvB2JTLDFAeTXRvbjnvrHFJGBRQisjH5vtU8BTZBB0jtQCYdLnMABw');
	
	//$map->setWidth('520px;');
	//$map->setHeight('500px;');
	$map->enableInfoWindow();
	/*foreach($mapDetailsArray as $job_mapped_id => $jobDetails)
		{
		$addressArray= explode(",", $jobDetails['job_city']);
		foreach($addressArray as $id => $address)
			{
			$text= $jobDetails['job_company_name']."<br>".$address;
			$map->addMarkerByAddress($address,'$address',$text);
			}
		}*/
		$map->addMarkerByAddress($address,'$address',$text);
		$city =  $mapDetailsArray['city'];
		
		$text=$mapDetailsArray['country']."<br>".$mapDetailsArray['city'];
		$DD=$map->addMarkerByAddress($city,'$city',$text);
		// added by chetan
		$google_map_header=$map->getHeaderJS();
      $google_map_js=$map->getMapJS();
      $google_map_sidebar=$map->getSidebar();
      $google_map=$map->getMap();
      $onload = $map->getOnLoad();

     // close by chetan.
	//print_R($DD);	
	$map->printHeaderJS(); 
	$map->printMapJS(); 
	}
?>


			<h1>Mapped Jobs</h1>
	<?php if(count($mapDetailsArray) <= 0) {?>				
				<h4>In the Land of the Lost*?  You have to map jobs first.</h4><p>This page displays all the jobs you've mapped on JobJasoos.  Sorta like a giant <a href="/jobs/list/q/marketing">Where's Waldo</a>, except not so much.</p><p>Try clicking the "More" link under the job listing to see, well, more about that job.  And then you'll get a nifty "Map this Job" link that adds jobs to this page.  Now you can see whether that job in <a href="/jobs/list/l/Chennai">Chennai</a> is closer than the one in <a href="/jobs/list/l/Mumbai">Mumbai</a>.  Add your address and we'll even tell you if you'll be needing to invest in a new hybrid car to get there.</p><p>What would you do without us? (Don't answer that.)</p><p><em>* Land of the Lost fans, unite!</em></p>
	<?php } else { ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">


    <html >
    <head>
    <?php echo $google_map_header; ?>
    <?php echo $google_map_js; ?>
     

    <!-- necessary for google maps polyline drawing in IE -->
  <style type="text/css">
      v\:* {ldelim}
        behavior:url(#default#VML);
     {rdelim} 
    </style>
    </head>
   
    <table width="200" border="1" cellpadding="0" cellspacing="0">
      <tr>
        <td width="10%"><?php echo $google_map; ?></td>
		<?php echo $onload;
		  ?>
             <td><?php  echo  $google_map_sidebar; 
                         ?>
             </td>
      </tr>
     <tr> 
         <td>  <?php   // echo $map->printMap();
         ?> 
         </td>
      </tr>



<tr>
<td colspan="2">


</td>
</tr>

    </table>
   
    </html>
			
<p>How's the commute look?  We've pinpointed all the jobs you've mapped here.  Now if you're late for your interview because you got lost - hey, we tried.
   <div id="map"><?php $map->printMap();  }?></div>
 
  